Rails.application.routes.draw do
  # 注册
  post '/register', to: 'users#create'

  # 登录
  post '/login', to: 'users#login'

  # 自动登录例子，如果用户访问时带了token就自动登录
  # 也可以是其他功能，比如返回活动列表，
  get '/auto_login', to: 'users#auto_login'
end
